package com.powernode.config;

import com.powernode.common.ResultJson;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Description TODO
 * @Date 2022/3/28 12:50
 * @Version 1.0
 */
@RestControllerAdvice
public class DefaultException {
    @ExceptionHandler
    ResultJson defaultExceptionHandler(Exception ex){
        ex.printStackTrace();
        System.out.println(ex.getMessage());
        return ResultJson.failed("系统出错了，请联系管理员");
    }
}
